package com.sky.loveshop.entity.aliPay;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author xcy
 * @version V1.0
 * @description 当面付 商家扫用户二维码 预下单请求
 * @date 2024/9/1 16:35
 */
@NoArgsConstructor
@Data
public class PreCreatRequest {

    @JsonProperty("out_trade_no")
    private String outTradeNo;
    @JsonProperty("total_amount")
    private String totalAmount;
    @JsonProperty("subject")
    private String subject;
    @JsonProperty("product_code")
    private String productCode;
    @JsonProperty("seller_id")
    private String sellerId;
    @JsonProperty("body")
    private String body;
    @JsonProperty("goods_detail")
    private List<GoodsDetailDTO> goodsDetail;
    @JsonProperty("extend_params")
    private ExtendParamsDTO extendParams;
    @JsonProperty("business_params")
    private BusinessParamsDTO businessParams;
    @JsonProperty("discountable_amount")
    private String discountableAmount;
    @JsonProperty("store_id")
    private String storeId;
    @JsonProperty("operator_id")
    private String operatorId;
    @JsonProperty("terminal_id")
    private String terminalId;
    @JsonProperty("merchant_order_no")
    private String merchantOrderNo;

    @NoArgsConstructor
    @Data
    public static class ExtendParamsDTO {
        @JsonProperty("sys_service_provider_id")
        private String sysServiceProviderId;
        @JsonProperty("specified_seller_name")
        private String specifiedSellerName;
        @JsonProperty("card_type")
        private String cardType;
    }

    @NoArgsConstructor
    @Data
    public static class BusinessParamsDTO {
        @JsonProperty("mc_create_trade_ip")
        private String mcCreateTradeIp;
    }

    @NoArgsConstructor
    @Data
    public static class GoodsDetailDTO {
        @JsonProperty("goods_name")
        private String goodsName;
        @JsonProperty("quantity")
        private Integer quantity;
        @JsonProperty("price")
        private String price;
        @JsonProperty("goods_id")
        private String goodsId;
        @JsonProperty("goods_category")
        private String goodsCategory;
        @JsonProperty("categories_tree")
        private String categoriesTree;
        @JsonProperty("show_url")
        private String showUrl;
    }
}
